import vue from "@vitejs/plugin-vue";
import path from "path";
import { defineConfig } from "vite";


// https://vite.dev/config/
export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias: {
      // @ 替代为 src
      "@": path.resolve(__dirname, "src"),
      // @component 替代为 src/component
      "@components": path.resolve(__dirname, "src/components"),
    },
  },
  server: {
    host: "localhost",
    port: 10011,
  },
  css: {
    preprocessorOptions: {
      less: {
        javascriptEnabled: true,
        modifyVars: {
          black: "#000",
          white: "#fff",
          "background-color-base": "#000",
          "component-background": "#eee",
          "shadow-2": "#aaa",
          "text-color": "#fff",
          "background-color-light": "#fff",
          "disabled-color": "#aaa",
          "body-background": "#fff",
          "popover-background": "#fff",
          "item-hover-bg": "#fff",
          "border-color-split": "#fff",
          "table-header-bg": "#fff",
          "calendar-bg": "#fff",
          "pagination-item-bg": "#fff",
          "icon-color": "#fff",
          "border-color-base": "#fff",
          "primary-4": "#fff",
          "primary-color": "#fff",
          "shadow-1-down": "#fff",
          "shadow-color": "#fff",
          "checkbox-check-color": "#fff",
          "input-color": "#fff",
          "select-background": "#fff",
          "input-disabled-bg": "#fff",
          "select-border-color": "#fff",
          "layout-header-background": "#fff",
          "disabled-bg": "#fff",
          "input-bg": "#fff",
          "border-color-inverse": "#fff",
          "text-color-secondary": "#fff",
          "skeleton-color": "#fff",
        },
      },
    },
  },
});
